package com.example.mybatis_demo.service;

import com.example.mybatis_demo.mapper.UserInfoMapper;
import com.example.mybatis_demo.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-11-29
 * Time: 15:00
 */

@Service
public class UserService {
    //从userInfoMapper接口中获取
    @Autowired
    private UserInfoMapper userInfoMapper;
    public List<UserInfo> getUserAll(){
        return userInfoMapper.getUserInfoAll();
    }

    public UserInfo queryUserByNameAndPassword(String name , String password) {
        return userInfoMapper.queryUserBuNameAndPassword(name,password);
    }
}
